Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add the ScriptService to the field parser config #60933

Merged

Conversation

nik9000
Copy link
Member

@nik9000 nik9000 commented Aug 10, 2020

This makes parsing runtime fields much simpler.

We'd initially resisted doing this but all of our other integration options
proved more troublesome.

@nik9000 nik9000 requested a review from romseygeek August 10, 2020 20:48
@nik9000 nik9000 added the :Search/Search Search-related issues that do not fall into other categories label Aug 10, 2020
@nik9000 nik9000 marked this pull request as ready for review August 10, 2020 20:48
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-search (:Search/Search)

@elasticmachine elasticmachine added the Team:Search Meta label for search team label Aug 10, 2020
@nik9000
Copy link
Member Author

nik9000 commented Aug 10, 2020

@romseygeek I've opened this one against the runtime fields branch which lets me verify that it solves my problems. If you like it I'd like to cherry pick it over to master and 7.x.

Copy link
Contributor

@romseygeek romseygeek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Huh, that was easier than I was expecting it to be. I left one grammar nit, other than that LGTM. I'm fine with this staying in the runtime fields branch for now, better to have something that actually uses the ScriptService when it's added.

@@ -146,14 +150,21 @@ public DateFormatter getDateFormatter() {

protected Function<String, SimilarityProvider> similarityLookupService() { return similarityLookupService; }

/**
* The {@linkplain ScriptService} to compile scripts needs by the {@linkplain Mapper}.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/needs/needed by/

@nik9000
Copy link
Member Author

nik9000 commented Aug 10, 2020

I'm fine with this staying in the runtime fields branch for now, better to have something that actually uses the ScriptService when it's added.

Sure! If we start to see a bunch of merge conflicts I might bring this up again!

@nik9000 nik9000 merged commit 9b9aa5f into elastic:feature/runtime_fields Aug 11, 2020
@nik9000
Copy link
Member Author

nik9000 commented Aug 11, 2020

Thanks @romseygeek !

@javanna javanna requested a review from rjernst August 13, 2020 14:12
match:
animal: cow
- match: {hits.total.value: 1}
- match: {hits.hits.0._source.animal: cow}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was wondering if it would be possible to have some other way of testing this besides a yaml test, a single node test would also be good I think

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
:Search/Search Search-related issues that do not fall into other categories Team:Search Meta label for search team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants